{extend name="layout/base" /}
{block name="main"}
<div class="news">
    <div class="container">
        <div class="index-title txt-c">
            <em>在线留言</em>
        </div>
        <div class="news-list c">
            <ul>

                <div class="content-form">
                    <form name="form1" method="post" action="/contact/save">
                        <table width="1120" height="400" border="1" align="center" cellpadding="3" cellspacing="1"
                               bordercolor="#67B41A" style="border-collapse:collapse">
                            <tr>
                                <td>账号：</td>
                                <td align="left"><input name='username' type='text' id='username' value="{:session('user.username')}"
                                                        readonly="readonly" class="user"/>
                                    &nbsp;*
                                </td>
                            </tr>
                            <tr>
                                <td>照片：</td>
                                <td align="left">
                                    <input name="photo_no" type="radio" value="1" checked>
                                    <img src="__STATIC__/1.gif" width="64" height="71">
                                    <input type="radio" name="photo_no" value="2">
                                    <img src="__STATIC__/2.gif" width="64" height="71">
                                    <input type="radio" name="photo_no" value="3">
                                    <img src="__STATIC__/3.gif" width="64" height="71">
                                    <input type="radio" name="photo_no" value="4">
                                    <img src="__STATIC__/4.gif" width="64" height="71">
                                    <input type="radio" name="photo_no" value="5">
                                    <img src="__STATIC__/5.gif" width="64" height="71"></td>
                            </tr>
                            <tr>
                                <td>姓名：</td>
                                <td align="left"><input name='name' type='text' id='name' value='' class="user"
                                                        style="width:200px;"/>
                                    &nbsp;*
                                </td>
                            </tr>
                            <tr>
                                <td>留言：</td>
                                <td align="left"><textarea name='content' cols='50' rows='8' id='content' class="user"
                                                           style="width:500px; height:100px;"></textarea>
                                    &nbsp;*
                                </td>
                            </tr>
                            <tr>
                                <td>&nbsp;</td>
                                <td align="left">
                                    <input type="submit" name="Submit" value="添加" onClick="return check();"
                                           class="content-form-signup"/>
                                    <input type="reset" name="Submit2" value="重置" class="content-form-signup"/>
                                </td>
                            </tr>
                        </table>
                    </form>
                    <script language="javascript">
                        function check() {
                            if (document.form1.name.value == "") {
                                alert("请输入姓名");
                                document.form1.name.focus();
                                return false;
                            }
                            if (document.form1.content.value == "") {
                                alert("请输入留言");
                                document.form1.content.focus();
                                return false;
                            }
                        }
                    </script>
                </div>
            </ul>
        </div>
    </div>
</div>
{/block}
